<%@ page import="java.util.*" %>
<%@ page import="model.*" %>
<%@ page import="dao.*" %>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Tarefas pendentes</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div id="doc3" class="yui-t2">
  <div id="hd">
    <div id="header">
 
  </div>
  </div>
  <div id="bd">
    <div id="yui-main">
      <div class="yui-b">
        <div class="yui-g">
          <div class="yui-u first">
            <div class="content">
<form action="modificarStatusTarefa" method="post">
Filtrar: 
<a href="listaDeTodasTarefas.jsp">Todas tarefas</a> 
<a href="listaDeTarefasFeitas.jsp">Terefas feitas</a> 
	<table border="1" cellspacing="3">
		<tr><th>Nome</th><th>Pendente</th><th>Data</th><th>Prazo</th><th>Relevancia</th><th>Feito</th></tr>
	<%
	String login = (String)session.getAttribute("LOGIN");
	Usuario usuario = UsuarioDao.buscarUsuarioPorEmail(login);
	List<Tarefa> listaTarefas = (List<Tarefa>)TarefaDao.retornarTodasAsTarefasPendente(usuario.getId());
	for(int i = 0; i < listaTarefas.size(); i++){
		Tarefa tarefa = listaTarefas.get(i);
		%>
		<tr><td><%=tarefa.getNomeTarefa()%></td><td><%=tarefa.isPendente()%></td>
		<td><%=tarefa.getData() %></td>
		<td><%=tarefa.getPrazo() %></td>
		<td><%=tarefa.getRelevancia() %></td>
		<td>
		<input type="checkbox" name="tarefaPendentes" value="<%= tarefa.getId() %>"></td>

		<%
	}
	%>
	<tr align="center"><th align="center"><input align="right" type="submit" name="marcar" value="Marcar como Feita"></th>
	</table>

</form>

</div>
			
			
			
			
          </div>
          <div class="yui-u">
            <div class="content">                          </div>
			
			
			
          </div>
        </div>
      </div>
    </div>
    <div class="yui-b">
      <div id="secondary">
      <ul id="menubv">
<li>
<a href="index.jsp" title="Home">Home</a>
</li>

<li>
<a href="login.jsp" title="Sair">Sair</a>
</li>



</ul>
      </div>
    </div>
	</div>
  </div>  
	  
    </div>
  </div>
  <div id="ft">
  © Copyright 2013 - Jorge Anderson - Juarez de Lima - Otávio Araujo - Máquison Felipe
    <div id="footer">  <br>               </div>
	
	
  </div>
  
  <audio autoplay="autoplay" control preload>

<source src="Music/MARIO-mamamia.wav" audio/wav/>

</audio>
	

</body>
</html>